package leetcode.code0093;

import java.util.List;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution93 implements IDebug {

	public abstract List<String> restoreIpAddresses(String s);

	@Override
	public void debug1() {
		String s = "25525511135";
		List<String> r = this.restoreIpAddresses(s);
		List<String> e = HelpDebug.str2liststr("[\"255.255.11.135\",\"255.255.111.35\"]");
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		String s = "0000";
		List<String> r = this.restoreIpAddresses(s);
		List<String> e = HelpDebug.str2liststr("[\"0.0.0.0\"]");
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		String s = "1111";
		List<String> r = this.restoreIpAddresses(s);
		List<String> e = HelpDebug.str2liststr("[\"1.1.1.1\"]");
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug4() {
		String s = "101023";
		List<String> r = this.restoreIpAddresses(s);
		List<String> e = HelpDebug.str2liststr("[\"1.0.10.23\",\"1.0.102.3\",\"10.1.0.23\",\"10.10.2.3\",\"101.0.2.3\"]");
		HelpDebug.compare(e, r);
	}

	public void debug5() {
		String s = "010010";
		List<String> r = this.restoreIpAddresses(s);
		List<String> e = HelpDebug.str2liststr("[\"0.10.0.10\",\"0.100.1.0\"]");
		HelpDebug.compare(e, r);
	}
	public void debug6() {
		String s = "172162541";
		List<String> r = this.restoreIpAddresses(s);
		List<String> e = HelpDebug.str2liststr("[\"17.216.25.41\",\"17.216.254.1\",\"172.16.25.41\",\"172.16.254.1\",\"172.162.5.41\",\"172.162.54.1\"]");
		HelpDebug.compare(e, r);
	}

}
